
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type SystemGroupRequest struct {

	CateId string `json:"cate_id" form:"cate_id"`

	Name string `json:"name" form:"name"`

	Info string `json:"info" form:"info"`

	ConfigName string `json:"config_name" form:"config_name"`

	Fields string `json:"fields" form:"fields"`

}

func (r *SystemGroupRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *SystemGroupRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"cate_id": "required",

		"name": "required",

		"info": "required",

		"config_name": "required",

		"fields": "required",

	}
}

func (r *SystemGroupRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemGroupRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemGroupRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
